﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace TreeBuilder
{
	public class DeleteNodeAction : TreeOperationAction
	{
		private INode _node;

		public DeleteNodeAction(DottedCanvas canvas, INode node) 
			: base(canvas)
		{
			_node = node;
		}

		public override void Execute()
		{
			RemoveFromTree((UIElement) _node);
		}

		public override void Undo()
		{
			AddToTree((UIElement)_node);
		}
	}
}
